home *** CD-ROM | disk | FTP | other *** search
- // Blink - Version 1.1
-
- // This script varies opacity based on a cosine function.
- // The three variables below control the blinking rate & opacity range.
- // To use, select the layer whose opacity you wish to change in layer popup 1
-
- // LAYER PROPERTY CHANNEL
- // ------ ---------- --------
- // 1: Layer whose opacity to vary doesn't matter doesn't matter
- // 2: doesn't matter doesn't matter doesn't matter
-
- blink_speed = 1; // blinks per second
-
- low_opacity = 10.0; // low opacity value
-
- high_opacity = 90.0; // high opacity value
-
- opacity_range = high_opacity - low_opacity;
-
- pi = 3.141592654;
-
- op_normal = (cos(blink_speed * time() * pi * 2) + 1) / 2;
-
- value(pop_layer(1), opacity) = (op_normal * opacity_range) + low_opacity;
-